package cn.edu.hunau.java.week02.day04.shape;

public abstract class Shape {

    private Point position;

    public Shape() {
    }

    public Shape(Point position) {
        this.position = position;
    }

    public abstract double area();

    public abstract boolean container(Point point);

    public boolean contains(int x,int y) {
        return container(new Point(x,y));
    }

    public Point getPosition() {
        return position;
    }

    public void setPosition(Point position) {
        this.position = position;
    }
}
